ARCH=@ARCH@

OBJS +=libexif.o ExifParse.o IptcParse.o JpegParse.o
CFLAGS +=-D_LINUX -D_DLL -fPIC -O2
CXXFLAGS +=-D_LINUX -D_DLL -fPIC -O2

SYSDIR=@abs_top_srcdir@/system
SO=libexif-$(ARCH).so
SLIB=@abs_top_srcdir@/system/$(SO)

$(SLIB): $(OBJS)
ifeq ($(findstring osx,$(ARCH)), osx)
	$(CXX) $(LDFLAGS) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
		-bundle -undefined dynamic_lookup -read_only_relocs suppress -o $@ \
		@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS)
else
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) -Wl,--unresolved-symbols=ignore-all \
		`cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o
endif

include @abs_top_srcdir@/Makefile.include
